// review-overview.js
Component({
  properties: {
    reviewStats: {
      type: Object,
      value: {
        total: 0,
        reviewed: 0,
        mastered: 0,
        remaining: 0,
        breakdown: {
          easy: 0,
          normal: 0,
          hard: 0
        }
      }
    },
    magicPower: {
      type: Number,
      value: 0
    },
    formattedMagicPower: {
      type: String,
      value: '0.00'
    },
    completionBonus: {
      type: Number,
      value: 0
    },
    suggestedTime: {
      type: Number,
      value: 0
    }
  },

  methods: {
    // 开始复习
    startReview: function() {
      if (this.properties.reviewStats.total > 0) {
        this.triggerEvent('startreview');
      }
    },
    
    // 开始限时挑战
    startTimedChallenge: function() {
      if (this.properties.reviewStats.total > 0) {
        this.triggerEvent('starttimedchallenge');
      }
    }
  }
});